<template>
  <table class="table table-bordered table-striped">
    <thead>
      <tr>
        <slot name="thead"></slot>
      </tr>
    </thead>
    <tbody>
      <tr v-for="(item,index) in data" :key="item.id">
        <slot name="tbody" :row="item" :index="index"></slot>
      </tr>
    </tbody>
  </table>
</template>

<script>
export default {
  name:'MyTable',
  props: {
    data: {
      type: Array,
      require: true,
      default: []
    }
  }
}
</script>

<style>

</style>